package com.android.fragmentdemo.adapters
import android.util.Log
import com.android.fragmentdemo.R
import com.hengfoxwolf.commonbase.base.databeans.ItemListData
import com.android.fragmentdemo.databinding.ListDataRvItemBinding
import com.hengfoxwolf.commonbase.base.adapter.BaseRvAdapter

class ListDataRvAdapter : BaseRvAdapter<ItemListData,ListDataRvItemBinding>() {

    override fun getLayoutId() = R.layout.list_data_rv_item

    override fun bindData(holder: ViewHolder, dataItem: ItemListData, position: Int) {
        Log.d(TAG,"$TAG--${dataItem.title}")
        holder.binding.evgListDataRoot.setItemData(itemDataSet?.get(position))
    }

    override fun onViewRecycled(holder: ViewHolder) {
        super.onViewRecycled(holder)
        Log.d(TAG,"$TAG---fun onViewRecycled---")
    }

    companion object {
        const val TAG = "ListDataRvAdapter"
    }
}